﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace TestSys.Models
{
    public class CourseModel
    {
        public int CourseID { get; set; }

        [Required]
        [Display(Name = "Name")]
        [StringLength(60, ErrorMessage = "1-60 characters only!")]
        public string CourseName { get; set; }

        public CourseModel(courses src)
        {
            CourseID = src.CourseID;
            CourseName = src.CourseName;
        }
        public CourseModel() { }
    }

    public class TestModel
    {
        public int TestID { get; set; }

        [Required]
        [StringLength(50, ErrorMessage = "1-50 characters only!")]
        public string TestName { get; set; }

        [Required]
        [StringLength(300, ErrorMessage = "developers mistake in length of path!")]
        public string TestPath { get; set; }

        public TestModel() { }
        public TestModel(tests src)
        {
            TestID = src.TestID;
            TestName = src.TestName;
            TestPath = src.TestPath;
        }
    }
}